package com.ogawa.base.utils

import android.content.res.Resources
import com.ogawa.base.base.BaseApp


public val Int.toPx: Int
    get() {
        var scale = BaseApp.appContext.resources.displayMetrics.density;
        return ( this* scale + 0.5f).toInt();
    }

val Float.px: Float get() = (this * Resources.getSystem().displayMetrics.density)

val Int.px: Int get() = ((this * Resources.getSystem().displayMetrics.density).toInt())